﻿@{
    ViewBag.Title = "LoginLogIndex";
}
@section head
{
    <link href="@Url.Content("~/ScriptPlugin/easyui/themes/gray/easyui.css")" rel="stylesheet" />
    <link href="@Url.Content("~/ScriptPlugin/easyui/themes/icon.css")" rel="stylesheet" />
    <script type="text/javascript" src="@Url.Content("~/ScriptPlugin/easyui/jquery.easyui.min.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/ScriptPlugin/easyui/locale/easyui-lang-zh_CN.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/KingsSharp.DataGrid.Filter.js")"></script>
    <script src="@Url.Content("~/ScriptPlugin/WdatePicker/js/WdatePicker.js")"></script>
}
<div id="grid" style="height:99%;">
    <div id="toolpannel">
        <div class="content-pannel-buttons">
            <a><b class="p-icon-reload">刷新 </b></a>
            <a onclick="$('#grid').datagrid('load')">
                <b class="p-icon-serch">查询</b>
            </a>
        </div>
        <div class="datagrid-filter-pannel" id="filterpannel">
            <table class="content-table-serch">
                <tr>
                    <th>
                        日志时间从
                    </th>
                    <td>
                        <input type="text" class="p-icon-right p-icon-date-long" name="CreatedTime" data-filter="true" />
                        <a class="p-icon-filter p-icon-filter-style" style="display: block; width: 22px;
                            height: 22px; float: left">@Html.GetFilterItem("CreatedTime", typeof(DateTime), KingsSharp.Common.Filter.FilterOperate.GreaterOrEqual)</a>
                        </td>
                        <th>
                            到
                        </th>
                        <td>
                            <input type="text" class="p-icon-right p-icon-date-long" name="CreatedTime" data-traget="CreatedTime1" data-filter="true" />
                            <a class="p-icon-filter p-icon-filter-style" style="display: block; width: 22px;
                            height: 22px; float: left">@Html.GetFilterItem("CreatedTime1", typeof(DateTime), KingsSharp.Common.Filter.FilterOperate.LessOrEqual)</a>
                        </td>
                        <th></th>
                        <td></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    @section foot{
        <script type="text/javascript">
            function LoadLoginLogData() {
                var columns = [[
                  { field: "Action", title: "动作", width: 80 },
                    { field: "LoginCode", title: "账号", width: 110 },
                    { field: "Name", title: "用户名称", width: 90 },
                    { field: "Ip", title: "Ip地址", width: 120 },
                    { field: "Area", title: "所在地区", width: 110 },
                    { field: "Browser", title: "浏览器", width: 130 },
                    { field: "SystemName", title: "操作系统", width: 150 },
                    { field: "CreatedTime", title: "日志时间", width: 120 }
                ]];
                var parameter = {
                    title: "@Html.GetGridTitle("日志管理", "登陆日志查询")",
                    columns: columns,
                    singleSelect: true,
                    url: "@Url.Content("~/Logs/LoginLog/GetLoginLogGridData")",
                    pageNumber: 1
                };
                var grid = K.GetGridData("#grid", parameter).Grid;
            }
            LoadLoginLogData();
        </script>
    }